<template>
  <view>
    <!-- 系统分组 -->
    <u-popup :customStyle="{background: 'transparent'}" :show="isShow" mode="center" @close="close">
      <view class="wrap">
        <image class="close" mode="" src="https://travel20231111.oss-cn-hangzhou.aliyuncs.com/image/close.png"
               @click="close"></image>
        <view class="wraps flex">
          <view class="wraps-cont">
            <view class="ipt flex">
              <text>团队数量</text>
              <view class="input flex">
                <input v-model="number" min="1" type="number"/>
                <view class="icon">
                  <view class="flex" @click="add">
                    <image mode="" src="https://travel20231111.oss-cn-hangzhou.aliyuncs.com/image/fzt.png"></image>
                  </view>
                  <view class="flex" @click="del">
                    <image mode="" src="https://travel20231111.oss-cn-hangzhou.aliyuncs.com/image/fzb.png"></image>
                  </view>
                </view>
              </view>
            </view>
            <image class="submit" mode=""
                   src="https://travel20231111.oss-cn-hangzhou.aliyuncs.com/image/sjfz.png" @click="submit"></image>
          </view>
        </view>
      </view>
    </u-popup>
  </view>
</template>

<script>
export default {
  data() {
    return {
      isShow: false,
      number: 1
    }
  },
  methods: {
    show() {
      this.isShow = true
    },
    close() {
      this.isShow = false;
    },
    add() {
      this.number++;
    },
    submit() {
      if (!this.number) {
        this.toast('请想输入团队数量')
        return;
      }
      this.$emit('submit', this.number)
    },
    del() {
      if (this.number === 1) {
        return;
      }
      this.number--;
    },
  }
}
</script>

<style lang="scss" scoped>
.wrap {
  width: 610rpx;
  height: 434rpx;
  background-size: 610rpx 434rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(175.04deg, rgba(255, 255, 255, 0.21) 0%, rgba(255, 255, 255, 0.76) 22.93%, rgba(255, 255, 255, 0.66) 78.34%, rgba(255, 255, 255, 0) 100%);
  box-shadow: 0pt 10rpx 15rpx -3rpx rgba(0, 0, 0, 0.1), 0pt 4pt 6pt -2pt rgba(0, 0, 0, 0.05);
  border-radius: 40rpx;
  position: relative;

  .close {
    position: absolute;
    width: 80rpx;
    height: 80rpx;
    top: -10rpx;
    right: -10rpx;
  }

  .wraps {
    background-color: rgba(0, 117, 88, 1);
    width: 560rpx;
    height: 384rpx;
    border-radius: 40rpx;

    &-cont {
      width: 530rpx;
      height: 354rpx;
      border-radius: 40rpx;
      background-color: white;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      text {
        font-size: 30rpx;
        font-weight: 500;
        letter-spacing: 0pt;
        color: rgba(2, 99, 75, 1);
        margin-right: 13rpx;
      }

      .input {
        width: 182rpx;
        height: 70rpx;
        opacity: 1;
        border-radius: 7rpx;
        background: rgba(255, 255, 255, 1);
        border: 2rpx solid rgba(216, 216, 216, 1);

        input {
          flex: 1;
          padding: 0 10rpx;
          font-size: 36rpx;
          font-weight: 400;
          color: rgba(121, 121, 121, 1);
        }

        .icon {
          width: 67.53rpx;
          height: 70rpx;
          opacity: 1;
          background: rgba(229, 229, 229, 1);
          flex-shrink: 0;
          display: flex;
          flex-direction: column;

          view {
            height: 35rpx;
            width: 100%;
            // background-color: red;
            image {
              width: 18rpx;
              height: 10rpx;
            }
          }
        }
      }

      .submit {
        width: 216.67rpx;
        height: 75rpx;
        margin-top: 40rpx;
      }
    }
  }
}

</style>
